package com.alameda.provider.type;

import com.alameda.common.annotation.UnRpcIdempotent;
import com.alameda.service.type.AdMediaTypeService;
import com.alameda.type.api.AdMediaTypeProvider;
import com.alameda.type.vo.AdMediaTypeVO;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 媒体文件分类 同步接口层 具体实现
 *
 * @author Lv
 * @date 2024/07/20
 */
@DubboService
public class AdMediaTypeProviderImpl implements AdMediaTypeProvider {

    @Autowired
    private AdMediaTypeService adMediaTypeService;

    /**
     * 通过媒体id读取分类信息
     *
     * @param mediaId 媒体id
     * @return
     */
    @UnRpcIdempotent
    @Override
    public AdMediaTypeVO findTypeInfoByMediaId(Long mediaId) {
        return adMediaTypeService.findTypeInfoByMediaId(mediaId);
    }
}
